#ifndef GAMEVIEW_H
#define GAMEVIEW_H

#include <OgreRoot.h>
#include "VisibleObject.h"
#include "GameCamera.h"
#include "GameGUI.h"
#include "VideoSettings.h"

class GameView
{
public:
	GameView(void);
	~GameView(void);
	bool initView(Ogre::String pluginsCfg,
				Ogre::String configFileName,
				Ogre::String resourcesCfg);
	void setSkyBox(Ogre::String res);
	void addFrameListener(Ogre::FrameListener *listener);
	void removeFrameListener(Ogre::FrameListener *listener);
	void startRendering(void);
	// Creates and attaches an object at root
	bool createVisibleObject(const VisibleObjectPtr obj);
	void removeObject(Ogre::SceneNode *node);
	Ogre::SceneManager *getSceneManager(void) const;
	Ogre::RenderWindow *getWindow(void) const;
	GameCamera *getCamera(void) const;
	void update(Ogre::Real elapsedTime);
private:
    Ogre::Root *mpRoot;
	Ogre::RenderWindow *mpWindow;
	Ogre::SceneManager *mpSceneMgr;
	GameCamera *mpCamera;
	GameGUI *mpGUI;
	VideoSettings *mpVideoSettings;
};

#endif